Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Create  Documentation  Based  on  Script  Comments  

 Content of Create Documentation Based on Script Comments.vbs
MD5 Hash: BD49DAAC672B481D17DE07DEB5980429
' Description: Demonstrates the use of the FileSystemObject as a way to copy comments from a script to a separate text file. Requires comments to have been marked using '*.


Const ForReading = 1
Const ForWriting = 2

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objScriptFile = objFSO.OpenTextFile("c:\scripts\Service_Monitor.vbs", _
ForReading)
Set objCommentFile = objFSO.OpenTextFile("c:\scripts\Comments.txt", _
ForWriting, TRUE)

Do While objScriptFile.AtEndOfStream <> TRUE
strCurrentLine = objScriptFile.ReadLine
intIsComment = Instr(1,strCurrentLine,"'*")
If intIsComment > 0 Then
objCommentFile.Write strCurrentLine & VbCrLf
End If
Loop

objScriptFile.Close
objCommentFile.Close

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a